//#################     auto value variable from tool 	 #############//
extern unsigned char __text_end__;
extern unsigned char __bss_start__;
extern unsigned char __bss_end__;
extern unsigned char __data_start__;
//####################################################################//
extern void main();
extern unsigned int __getChipMessage(unsigned int addr);
//####################################################################//
void startup()
{
	unsigned int *s,*begin,*end;	
//############# 		init work for the chip 		    #############//
		*((unsigned int *)(0x40000000))=1;
		*((unsigned int *)(0x400015A0))=__getChipMessage(0xF28);
		*((unsigned int *)(0x40000000))=0;
//############# init variable who have initialization	#############//
	s = (unsigned int*)&__text_end__;		
	begin = (unsigned int*)&__data_start__;
	end = (unsigned int*)&__bss_start__;
	while(begin < end)
		*begin++ = *s++;
		
//############# init variable who have no initialization	#############//
#if 1	 //  0 not init this type variable
	begin = (unsigned int*)&__bss_start__;
	end = (unsigned int*)&__bss_end__;
	while(begin < end)
		*begin++ = 0;
#endif		
//############# begin to run main function	#############//		
	main();
}
//####################################################################//